#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    int getMissingNumber(vector<int>& nums) {
        unordered_set<int>s;
        for (int i = 0; i <= nums.size(); i++) s.insert(i);
        for (int x : nums) s.erase(x);
        return *s.begin();
    }
};
